{extend name="layout" /}
<!-- ================== BEGIN PAGE LEVEL STYLE ================== -->
<link href="artisan_plugins/DataTables/css/data-table.css" rel="stylesheet"/>
<link href="artisan_plugins/switchery/switchery.min.css" rel="stylesheet"/>
<link href="artisan_plugins/powerange/powerange.min.css" rel="stylesheet"/>
<!-- ================== END PAGE LEVEL STYLE ================== -->
{block name="content"}
<div class="content">
    <!-- begin breadcrumb -->
    <ol class="breadcrumb pull-right">
        <li><a href="{:url('admin/Index/index')}">首页</a></li>
        <li><a href="javascript:;">地图定位</a></li>
        <li><a href="javascript:;">百度地图api</a></li>
    </ol>
    <!-- end breadcrumb -->
    <!-- begin page-header -->
    <h1 class="page-header">地图定位2
        <small></small>
    </h1>
    <!-- end page-header -->
    <div class="col-md-12">
        <div class="panel panel-inverse" data-sortable-id="index-1">
            <div class="panel-heading">
                <div class="panel-heading-btn">
                    <a href="javascript:;" class="btn btn-xs btn-icon btn-circle btn-default" data-click="panel-expand"><i
                            class="fa fa-expand"></i></a>
                    <a href="javascript:;" class="btn btn-xs btn-icon btn-circle btn-success" data-click="panel-reload"><i
                            class="fa fa-repeat"></i></a>
                    <a href="javascript:;" class="btn btn-xs btn-icon btn-circle btn-warning"
                       data-click="panel-collapse"><i class="fa fa-minus"></i></a>
                    <a href="javascript:;" class="btn btn-xs btn-icon btn-circle btn-danger"
                       data-click="panel-remove"><i class="fa fa-times"></i></a>
                </div>
                <h4 class="panel-title">百度地图api</h4>
            </div>
            <div class="panel-body">
                <div id="allmap" style="width: 100%;height:800px;">
                </div>
            </div>
        </div>
    </div>
</div>
{/block}
{block name="script"}
<script src="http://api.map.baidu.com/api?v=1.4&ak=eS1iTGYxn4ZR8Klb2gnQHTMHErsBZdQ4" type="text/javascript"></script>
<script type="text/javascript">
    // 百度地图API功能
    var map = new BMap.Map("allmap");    // 创建Map实例
    map.centerAndZoom(new BMap.Point(120.639907115, 31.829987368), 13);  // 初始化地图,设置中心点坐标和地图级别
    map.addControl(new BMap.MapTypeControl());   //添加地图类型控件
    map.setCurrentCity("张家港");          // 设置地图显示的城市 此项是必须设置的
    map.enableScrollWheelZoom(true);     //开启鼠标滚轮缩放
</script>
{/block}